package com.example.demo.controller;

import com.example.demo.Service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @classDesc: 功能描述:()
 * @author: 黄伟成
 * @createTime: 2017/12/15 13:42
 **/
@RestController
public class HelloController {

    @Autowired
    private  MemberService memberService;
    @RequestMapping("/hello")
    public  String hello(){
        return "hello world!";
    }

    @GetMapping("/list")
    public Map getMemberList(){
        Map map = new HashMap();
        map.put("list",memberService.getMemberList());
        return map;
    }

}
